package club.ruanx.movie.service;


import club.ruanx.bean.PageBean;
import club.ruanx.core.service.base.BaseService;
import club.ruanx.movie.entity.Movie;
import club.ruanx.movie.param.MovieParam;
import org.springframework.data.domain.Page;

import java.util.List;

/**
 * @author 阮胜
 * @date 2018/10/21 20:16
 */
public interface MovieService extends BaseService<Movie, String> {

    Movie save(MovieParam movieParam);

    int findMovieHot(String movieId);

    int increaseMovieHot(String movieId, int increment);

    Page<Movie> findByCreateTime(PageBean pageBean);

    /**
     * @param count
     * @return
     */
    List<Movie> findHotList(int count);

    Page<Movie> findByRate(PageBean pageBean);

    Page<Movie> findByType(Integer type, PageBean pageBean);

    boolean existsBySpiderId(String spiderId);

    Page<Movie> findByActorOrDirector(String actor, String director, PageBean pageBean);

    Page<Movie> findAllOrderByCreateTimeDesc(PageBean pageBean);
}
